<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja">
  <head>
    <title>Canvas shadow drawImage example 3</title>
    <meta name="DC.creator" content="Kamiel Martinet, http://www.martinet.nl/">
    <meta name="DC.publisher" content="Mozilla Developer Center, http://developer.mozilla.org">

    <script type="text/xaml" id="xaml"><?xml version="1.0"?>
      <Canvas xmlns="http://schemas.microsoft.com/client/2007"></Canvas></script>
<script type="text/javascript" src="../uupaa-excanvas.js"></script>

    <script>
    function boot() {
      draw(document.getElementById('canvas').getContext('2d'));
      draw(document.getElementById('canvas2').getContext('2d'), 1);
      draw(document.getElementById('vmlcanvas').getContext('2d'));
    }
    function draw(ctx, disableShadowBlurAPI) {
      if (disableShadowBlurAPI) {
        ctx.xShadowBlur = 0; // Old Silverlight(ver1, ver2) rendering simulate
      }
      ctx.shadowBlur = 10;
      ctx.shadowOffsetX = 10;
      ctx.shadowOffsetY = 10;
      ctx.shadowColor = "gray";

      ctx.drawImage(document.getElementById('source'),33,71,104,124,21,20,87,104);
      ctx.drawImage(document.getElementById('frame'),0,0);

      ctx.drawImage(document.getElementById('source'),33,71,104,124,21,220,87,104);
    }
    </script>
    <style type="text/css">
      body { margin: 20px; font-family: arial,verdana,helvetica; background: #fff;}
      h1 { font-size: 140%; font-weight:normal; color: #036; border-bottom: 1px solid #ccc; }
      h2 { font-size: 100%; color: #036; }
      canvas { float: left; margin-right: 20px; margin-bottom: 20px; }
      pre { float:left; display:block; background: rgb(238,238,238); border: 1px dashed #666; padding: 15px 20px; margin: 0 0 10px 0; }
    </style>
  </head>
  <body onload="uuCanvas.ready(boot);">
    <div>
      <h1>Canvas <code>shadow drawImage</code> example 3</h1>
      <canvas id="canvas" width="150" height="350"></canvas>
      <canvas id="canvas2" width="150" height="350"></canvas>
      <canvas id="vmlcanvas" class="vml" width="150" height="350"></canvas>
      <pre>
&lt;canvas id="canvas" width="150" height="350"&gt;&lt;/canvas&gt;
&lt;canvas id="canvas2" width="150" height="350"&gt;&lt;/canvas&gt;
&lt;canvas id="vmlcanvas" class="vml" width="150" height="350"&gt;&lt;/canvas&gt;

function boot() {
  draw(document.getElementById('canvas').getContext('2d'));
  draw(document.getElementById('canvas2').getContext('2d'), 1);
  draw(document.getElementById('vmlcanvas').getContext('2d'));
}
function draw(ctx, disableShadowBlurAPI) {
  if (disableShadowBlurAPI) {
    ctx.xShadowBlur = 0; // Old Silverlight(ver1, ver2) rendering simulate
  }
  ctx.shadowBlur = 10;
  ctx.shadowOffsetX = 10;
  ctx.shadowOffsetY = 10;
  ctx.shadowColor = "gray";

  ctx.drawImage(document.getElementById('source'),33,71,104,124,21,20,87,104);
  ctx.drawImage(document.getElementById('frame'),0,0);

  ctx.drawImage(document.getElementById('source'),33,71,104,124,21,220,87,104);
}
    </pre>
      <div style="float:left;">
        <h2>Source images</h2>
        <img id="source" src="images/rhino.jpg" width="300" height="227" alt="">
        <img id="frame" src="images/picture_frame.png" width="132" height="150" alt="">
      </div>
    </div>
  </body>
</html>
